{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "bb0ae7b3",
   "metadata": {},
   "source": [
    "# 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0de4cfb0",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import re\n",
    "import math\n",
    "import emoji\n",
    "from tqdm import tqdm"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4ea9c26a",
   "metadata": {},
   "source": [
    "## 训练集\n",
    "### 读取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "7b348300",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>微博id</th>\n",
       "      <th>微博发布时间</th>\n",
       "      <th>发布人账号</th>\n",
       "      <th>微博中文内容</th>\n",
       "      <th>微博图片</th>\n",
       "      <th>微博视频</th>\n",
       "      <th>情感倾向</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4456070000000000.0</td>\n",
       "      <td>01月01日 23:50</td>\n",
       "      <td>存曦1988</td>\n",
       "      <td>写在年末冬初孩子流感的第五天，我们仍然没有忘记热情拥抱这2020年的第一天。带着一丝迷信，早...</td>\n",
       "      <td>['https://ww2.sinaimg.cn/orj360/005VnA1zly1gah...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4456070000000000.0</td>\n",
       "      <td>01月01日 23:58</td>\n",
       "      <td>LunaKrys</td>\n",
       "      <td>开年大模型…累到以为自己发烧了腰疼膝盖疼腿疼胳膊疼脖子疼#Luna的Krystallife#?</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4456050000000000.0</td>\n",
       "      <td>01月01日 22:39</td>\n",
       "      <td>小王爷学辩论o_O</td>\n",
       "      <td>邱晨这就是我爹，爹，发烧快好，毕竟美好的假期拿来养病不太好，假期还是要好好享受快乐，爹，新年...</td>\n",
       "      <td>['https://ww2.sinaimg.cn/thumb150/006ymYXKgy1g...</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4456060000000000.0</td>\n",
       "      <td>01月01日 23:08</td>\n",
       "      <td>芩鎟</td>\n",
       "      <td>新年的第一天感冒又发烧的也太衰了但是我要想着明天一定会好的?</td>\n",
       "      <td>['https://ww2.sinaimg.cn/orj360/005FL9LZgy1gah...</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4455980000000000.0</td>\n",
       "      <td>01月01日 17:42</td>\n",
       "      <td>changlwj</td>\n",
       "      <td>问：我们意念里有坏的想法了，天神就会给记下来，那如果有好的想法也会被记下来吗？答：那当然了。...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>4473030000000000.0</td>\n",
       "      <td>02月17日 19:08</td>\n",
       "      <td>中国教育新闻网</td>\n",
       "      <td>#抗击新型肺炎第一线#【@中国计量大学研制新冠病毒蛋白标准样品】记者从中国计量大学获悉，新型...</td>\n",
       "      <td>['https://ww1.sinaimg.cn/orj360/682cebefly1gbz...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>4472970000000000.0</td>\n",
       "      <td>02月17日 14:53</td>\n",
       "      <td>fuzhuoting</td>\n",
       "      <td>1、类RaTG13病毒（一种从云南蝙蝠身上分离出来的冠状病毒）可能是2019-nCoV的源头...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>4473040000000000.0</td>\n",
       "      <td>02月17日 19:18</td>\n",
       "      <td>蝌蚪五线谱</td>\n",
       "      <td>#微博辟谣#没有证据表明，吃大蒜、漱口水、涂抹芝麻油、生理盐水洗鼻子等手段可以防止感染新型冠...</td>\n",
       "      <td>['https://ww4.sinaimg.cn/orj360/6d2cc4e6ly1gbz...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99998</th>\n",
       "      <td>4472950000000000.0</td>\n",
       "      <td>02月17日 13:40</td>\n",
       "      <td>医库</td>\n",
       "      <td>【新冠疫情最受关注的十一篇英文核心期刊论文全解析】本文整理了关于新型冠状病毒最受关注的十一篇...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99999</th>\n",
       "      <td>4472870000000000.0</td>\n",
       "      <td>02月17日 08:19</td>\n",
       "      <td>有度为王</td>\n",
       "      <td>从蝙蝠携带的冠状病毒变异成2019-nCoV冠状病毒,怎样才能发生变异呢？有两种可能1.自然...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100000 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     微博id        微博发布时间       发布人账号  \\\n",
       "0      4456070000000000.0  01月01日 23:50      存曦1988   \n",
       "1      4456070000000000.0  01月01日 23:58    LunaKrys   \n",
       "2      4456050000000000.0  01月01日 22:39   小王爷学辩论o_O   \n",
       "3      4456060000000000.0  01月01日 23:08          芩鎟   \n",
       "4      4455980000000000.0  01月01日 17:42    changlwj   \n",
       "...                   ...           ...         ...   \n",
       "99995  4473030000000000.0  02月17日 19:08     中国教育新闻网   \n",
       "99996  4472970000000000.0  02月17日 14:53  fuzhuoting   \n",
       "99997  4473040000000000.0  02月17日 19:18       蝌蚪五线谱   \n",
       "99998  4472950000000000.0  02月17日 13:40          医库   \n",
       "99999  4472870000000000.0  02月17日 08:19        有度为王   \n",
       "\n",
       "                                                  微博中文内容  \\\n",
       "0      写在年末冬初孩子流感的第五天，我们仍然没有忘记热情拥抱这2020年的第一天。带着一丝迷信，早...   \n",
       "1        开年大模型…累到以为自己发烧了腰疼膝盖疼腿疼胳膊疼脖子疼#Luna的Krystallife#?   \n",
       "2      邱晨这就是我爹，爹，发烧快好，毕竟美好的假期拿来养病不太好，假期还是要好好享受快乐，爹，新年...   \n",
       "3                         新年的第一天感冒又发烧的也太衰了但是我要想着明天一定会好的?   \n",
       "4      问：我们意念里有坏的想法了，天神就会给记下来，那如果有好的想法也会被记下来吗？答：那当然了。...   \n",
       "...                                                  ...   \n",
       "99995  #抗击新型肺炎第一线#【@中国计量大学研制新冠病毒蛋白标准样品】记者从中国计量大学获悉，新型...   \n",
       "99996  1、类RaTG13病毒（一种从云南蝙蝠身上分离出来的冠状病毒）可能是2019-nCoV的源头...   \n",
       "99997  #微博辟谣#没有证据表明，吃大蒜、漱口水、涂抹芝麻油、生理盐水洗鼻子等手段可以防止感染新型冠...   \n",
       "99998  【新冠疫情最受关注的十一篇英文核心期刊论文全解析】本文整理了关于新型冠状病毒最受关注的十一篇...   \n",
       "99999  从蝙蝠携带的冠状病毒变异成2019-nCoV冠状病毒,怎样才能发生变异呢？有两种可能1.自然...   \n",
       "\n",
       "                                                    微博图片 微博视频 情感倾向  \n",
       "0      ['https://ww2.sinaimg.cn/orj360/005VnA1zly1gah...   []    0  \n",
       "1                                                     []   []   -1  \n",
       "2      ['https://ww2.sinaimg.cn/thumb150/006ymYXKgy1g...   []    1  \n",
       "3      ['https://ww2.sinaimg.cn/orj360/005FL9LZgy1gah...   []    1  \n",
       "4                                                     []   []    1  \n",
       "...                                                  ...  ...  ...  \n",
       "99995  ['https://ww1.sinaimg.cn/orj360/682cebefly1gbz...   []    0  \n",
       "99996                                                 []   []    0  \n",
       "99997  ['https://ww4.sinaimg.cn/orj360/6d2cc4e6ly1gbz...   []    0  \n",
       "99998                                                 []   []    1  \n",
       "99999                                                 []   []    0  \n",
       "\n",
       "[100000 rows x 7 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "file1=pd.read_csv('./数据集/nCoV_100k_train.labled.csv',encoding='utf8').astype(str)\n",
    "file1"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26d9129c",
   "metadata": {},
   "source": [
    "### 数据清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "d278f801",
   "metadata": {},
   "outputs": [],
   "source": [
    "def clean(content):\n",
    "    idx=[]\n",
    "    punc=[]\n",
    "    for i,d in enumerate(content):\n",
    "        # 去微博名\n",
    "        d=re.sub('//@.+:','',d)\n",
    "        # 去话题\n",
    "        d=re.sub('#\\w+#','',d)\n",
    "        # 去@\n",
    "        d=re.sub('@\\w+ ','',d)\n",
    "        # 去微博超话\n",
    "        d = re.sub('\\w+ ','',d)\n",
    "        d = re.sub('\\ue627\\w+ ','',d)\n",
    "        # 去微博表情\n",
    "        d = re.sub('\\[\\S+\\]','',d)\n",
    "        # 去微博视频\n",
    "        d=re.sub('L.+的\\w+视频$','',d)\n",
    "        # 去特殊字符，数字、字母未保留\n",
    "        d = re.findall('[\\u4e00-\\u9fa5]+',d,re.S)\n",
    "        d = ''.join(d)\n",
    "        # 不为空\n",
    "        if d!='' and d!='nan':\n",
    "            idx.append(i)\n",
    "            punc.append(d)\n",
    "    return pd.Series(punc), idx"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "4291fc22",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>情感倾向</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>写在年末冬初孩子流感的第五天我们仍然没有忘记热情拥抱这年的第一天带着一丝迷信早晨给孩子穿上红...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>开年大模型累到以为自己发烧了腰疼膝盖疼腿疼胳膊疼脖子疼</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>邱晨这就是我爹爹发烧快好毕竟美好的假期拿来养病不太好假期还是要好好享受快乐爹新年快乐发烧好了...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>新年的第一天感冒又发烧的也太衰了但是我要想着明天一定会好的</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>问我们意念里有坏的想法了天神就会给记下来那如果有好的想法也会被记下来吗答那当然了有坏的想法天...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98468</th>\n",
       "      <td>中国计量大学研制新冠病毒蛋白标准样品记者从中国计量大学获悉新型冠状病毒肺炎疫情发生以来该校俞...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98469</th>\n",
       "      <td>类病毒一种从云南蝙蝠身上分离出来的冠状病毒可能是的源头在被发现之前外界质疑的所谓个疑似插入片...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98470</th>\n",
       "      <td>没有证据表明吃大蒜漱口水涂抹芝麻油生理盐水洗鼻子等手段可以防止感染新型冠状病毒</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98471</th>\n",
       "      <td>新冠疫情最受关注的十一篇英文核心期刊论文全解析本文整理了关于新型冠状病毒最受关注的十一篇英文...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98472</th>\n",
       "      <td>从蝙蝠携带的冠状病毒变异成冠状病毒怎样才能发生变异呢有两种可能自然变异实验室修改病毒</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>98473 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                       0 情感倾向\n",
       "0      写在年末冬初孩子流感的第五天我们仍然没有忘记热情拥抱这年的第一天带着一丝迷信早晨给孩子穿上红...    0\n",
       "1                            开年大模型累到以为自己发烧了腰疼膝盖疼腿疼胳膊疼脖子疼   -1\n",
       "2      邱晨这就是我爹爹发烧快好毕竟美好的假期拿来养病不太好假期还是要好好享受快乐爹新年快乐发烧好了...    1\n",
       "3                          新年的第一天感冒又发烧的也太衰了但是我要想着明天一定会好的    1\n",
       "4      问我们意念里有坏的想法了天神就会给记下来那如果有好的想法也会被记下来吗答那当然了有坏的想法天...    1\n",
       "...                                                  ...  ...\n",
       "98468  中国计量大学研制新冠病毒蛋白标准样品记者从中国计量大学获悉新型冠状病毒肺炎疫情发生以来该校俞...    0\n",
       "98469  类病毒一种从云南蝙蝠身上分离出来的冠状病毒可能是的源头在被发现之前外界质疑的所谓个疑似插入片...    0\n",
       "98470            没有证据表明吃大蒜漱口水涂抹芝麻油生理盐水洗鼻子等手段可以防止感染新型冠状病毒    0\n",
       "98471  新冠疫情最受关注的十一篇英文核心期刊论文全解析本文整理了关于新型冠状病毒最受关注的十一篇英文...    1\n",
       "98472         从蝙蝠携带的冠状病毒变异成冠状病毒怎样才能发生变异呢有两种可能自然变异实验室修改病毒    0\n",
       "\n",
       "[98473 rows x 2 columns]"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "con, idx=clean(file1['微博中文内容'])\n",
    "df_train=pd.concat([con,pd.Series(file1['情感倾向'][idx]).reset_index()['情感倾向']],axis=1)\n",
    "df_train"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5d45b4af",
   "metadata": {},
   "source": [
    "### 标签清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "6c05a4a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      56319\n",
       "1      25223\n",
       "-1     16845\n",
       "nan       80\n",
       "-          1\n",
       "4          1\n",
       "-2         1\n",
       "·          1\n",
       "10         1\n",
       "9          1\n",
       "Name: 情感倾向, dtype: int64"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train['情感倾向'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "d6e356a5",
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(len(df_train)):\n",
    "    if df_train['情感倾向'][i]!='0' and df_train['情感倾向'][i]!='1' and df_train['情感倾向'][i]!='-1':\n",
    "        df_train=df_train.drop(index=i,axis=0)\n",
    "    else:\n",
    "        df_train['情感倾向'][i]=int(df_train['情感倾向'][i])+1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "ddea7c67",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1    56319\n",
       "2    25223\n",
       "0    16845\n",
       "Name: 情感倾向, dtype: int64"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train['情感倾向'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "27f705a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(98387, 2)"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4e74ea43",
   "metadata": {},
   "source": [
    "### 保存数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "1bb4062f",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_train.to_csv('./数据集/train.csv',encoding='gbk',index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56e55871",
   "metadata": {},
   "source": [
    "## 测试集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "0e9955ff",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0       新年第一天元气满满的早起出门买早饭结果高估了自己抗冻能力回家成功冻发烧大概是想告诉我要量力而...\n",
       "1       大宝又感冒鼻塞咳嗽了还有发烧队友加班几天不回感觉自己的情绪在家已然是随时引爆的状态情绪一上来...\n",
       "2                              还要去输两天液这天也太容易感冒发烧了一定要多喝热水啊\n",
       "3                                  我太难了别人怎么发烧都没事就我一检查甲型流感\n",
       "4       果然是要病一场的喽回来第三天开始感冒今儿还发烧了喉咙眼睛都难受的一匹怎么样能不经意让我的毕设...\n",
       "                              ...                        \n",
       "9852                                               的黑天鹅事件\n",
       "9853    心灵鸡汤我们所有人和我们这个国家一起正在经历着一场这个星球上史无前例的考验华中枢纽千万人口级...\n",
       "9854    武大人民医院发热咳嗽并非新冠肺炎的唯一首发症状来自界面新闻武汉大学人民医院研究组月日发布高度...\n",
       "9855                                          闭关第二天发现一根白发\n",
       "9856                       昨天还在想如果有动画短片就好了今天就有了视频果然更直接有效吧\n",
       "Length: 9857, dtype: object"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "file2=pd.read_csv('./数据集/nCov_10k_test.csv',encoding='utf8').astype(str)\n",
    "df_test, idx=clean(file2['微博中文内容'])\n",
    "df_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "85719b4c",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_test.to_csv('./数据集/test.csv',encoding='gbk',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c217e76f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:secondenv] *",
   "language": "python",
   "name": "conda-env-secondenv-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
